﻿<div class="top-row pl-4 navbar navbar-dark">
    <a class="navbar-brand" href="">Blazor</a>
    <button class="navbar-toggler" onclick="@ToggleNavMenu">
        <span class="navbar-toggler-icon"></span>
    </button>
</div>

<div class="@NavMenuCssClass" onclick="@ToggleNavMenu">
    <ul class="nav flex-column">
        <li class="nav-item px-3">
            <NavLink class="nav-link" href="" Match="NavLinkMatch.All">
                <span class="oi oi-home" aria-hidden="true"></span> Home
            </NavLink>
        </li>
        <li class="nav-item px-3">
            <NavLink class="nav-link" href="counter">
                <span class="oi oi-plus" aria-hidden="true"></span> Counter
            </NavLink>
        </li>
        <li class="nav-item px-3">
            <NavLink class="nav-link" href="fetchdata">
                <span class="oi oi-list-rich" aria-hidden="true"></span> Fetch data
            </NavLink>
        </li>
        <li class="nav-item px-3">
            <NavLink class="nav-link" href="localstorageasync">
                <span class="oi oi-list-rich" aria-hidden="true"></span> 异步本地存储
            </NavLink>
        </li>
        <li class="nav-item px-3">
            <NavLink class="nav-link" href="localstoragesync">
                <span class="oi oi-list-rich" aria-hidden="true"></span> 同步本地存储
            </NavLink>
        </li>
        <li class="nav-item px-3">
            <NavLink class="nav-link" href="toast">
                <span class="oi oi-list-rich" aria-hidden="true"></span> 提示框
            </NavLink>
        </li>
        <li class="nav-item px-3">
            <NavLink class="nav-link" href="localisation">
                <span class="oi oi-list-rich" aria-hidden="true"></span> 本地化
            </NavLink>
        </li>
        <li class="nav-item px-3">
            <NavLink class="nav-link" href="loadingbar">
                <span class="oi oi-list-rich" aria-hidden="true"></span> 顶部加载进度条
            </NavLink>
        </li>
        <li class="nav-item px-3">
            <NavLink class="nav-link" href="menu">
                <span class="oi oi-list-rich" aria-hidden="true"></span> 自定义菜单
            </NavLink>
        </li>
        <li class="nav-item px-3">
            <NavLink class="nav-link" href="modal">
                <span class="oi oi-list-rich" aria-hidden="true"></span> 模态窗口
            </NavLink>
        </li>
    </ul>
</div>

@functions {
    bool collapseNavMenu = true;

    string NavMenuCssClass => collapseNavMenu ? "collapse" : null;

    void ToggleNavMenu()
    {
        collapseNavMenu = !collapseNavMenu;
    }
}
